cmake_minimum_required(VERSION 3.0)
SET(PROJECT_NAME nginx)
project(${PROJECT_NAME} VERSION 0.1.0)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wfatal-errors")
add_definitions(-std=c++1y)
add_definitions(-fpermissive)
aux_source_directory(./_include INCLUDE)
include_directories("./_include")

aux_source_directory(./app APP)
include_directories("./app")

aux_source_directory(./logic LOGIC)
include_directories("./logic")

aux_source_directory(./misc MISC)
include_directories("./misc")

aux_source_directory(./net NET)
include_directories("./net")

aux_source_directory(./proc PROC)
include_directories(${PROC})

aux_source_directory(./signal SIGNAL)
include_directories("./signal")

add_executable(${PROJECT_NAME} ./app/nginx.cpp ${APP} ${LOGIC} ${MISC} ${NET} ${PROC} ${SIGNAL} ${INCLUDE})
target_link_libraries(${PROJECT_NAME} pthread)


set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
